<!-- h2 stays for breadcrumbs -->
<h2 class="h2bread">
  <a href="<?php __e('siteadmin/dashboard');?>">Dashboard</a> &raquo; 
  <a href="<?php __e($cur_c);?>"><?php __e(ucwords($p_c));?></a> &raquo; 
  <a href="#" class="active"><?php __e(ucwords($frm_mode));?></a>
</h2>
<div id="main">
  <h3><?php echo $cont_title; ?></h3>
  <?php $this->load->view('admin_messages',$msg_info); ?>
<form action="<?php __e($frm_action);?>" method="post" name="<?php __e($frm_name);?>" id="<?php __e($frm_name);?>" class="frmreg" enctype="multipart/form-data">
  <input type="hidden" name="frm_token" id="frm_token" value="<?php __e($frm_token);?>" />
  <input type="hidden" name="frm_mode" id="frm_mode" value="<?php __e($frm_mode);?>" />
  <input type="hidden" name="frm_id" id="frm_id" value="<?php __e($frm_id);?>" />
  
  <fieldset>
    
  <table border="0" cellpadding="0" cellspacing="0" class="bk_tbl" width="100%">
    <?php if($frm_mode == 'edit'){ ?>
    <tr>
      <td colspan="3" align="right">
        <input type="button" name="btn_reg" id="btn_reg" value="Edit Volume" class="button-submit" onclick="javascript:redirect_page('<?php __e(site_url('volumes/os_admin/setj/'.$frm_id));?>');"/>        
      </td>
    </tr>
    <?php } ?>

    <tr>
      <td colspan="2"><h3>General Details</h3></td>
    </tr>
    <tr>
      <td><label for="txt_id"><span class="imp">&nbsp;</span>ID</label></td>
      <td><?php __earray($post_arr, 'os_journals_id'); ?></td>
    </tr>
    <?php if($frm_mode == 'edit'){ $p_dt = __earray($post_arr, 'os_journals_created',TRUE); ?>      
    <tr>
      <td><label for="txt_id"><span class="imp">&nbsp;</span>Created</label></td>
      <td><?php __e( __set_date($p_dt, 3) ); ?></td>
    </tr>                    
    <?php } ?>
    <tr>
      <td><label for="os_journals_status"><span class="imp">&nbsp;</span>Status</label></td>
      <td>   
        <?php $chk = __earray($post_arr, 'os_journals_status', TRUE); ?>
        <input type="checkbox" name="os_journals_status" id="os_journals_status" value="1" <?php if($chk == 1){__e('checked="checked"');}?> />              
      </td>
    </tr>
    <tr>
      <td><label><span class="imp">*</span>Category</label></td>
      <td>
        <?php
          $list_data = array();
          $list_data['id'] = 'os_category_id';
          $list_data['value'] = 'os_category_name';
          $list_data['key'] = 'os_category_id';
          $list_data['list'] = $frm_select_cat['list'];
          $list_data['sel'] = __earray($post_arr, 'os_category_id', true);
          __e(build_select_box($list_data)); 
        ?>
      </td>
    </tr>
    <tr>
      <td><label><span class="imp">*</span>Editors</label></td>
      <td>
        <?php
          $list_data = array();
          $list_data['id'] = 'os_editor_id';
          $list_data['value'] = 'os_editor_name';
          $list_data['key'] = 'os_editor_id';
          $list_data['list'] = $frm_select_editor['list'];
          $list_data['sel'] = __earray($post_arr, 'os_editor_id', true);
          __e(build_select_box($list_data)); 
        ?>
      </td>
    </tr>
    <tr>
      <td><label><span class="imp">*</span>Publishers</label></td>
      <td>
        <?php
          $list_data = array();
          $list_data['id'] = 'os_pub_id';
          $list_data['value'] = 'os_pub_name';
          $list_data['key'] = 'os_pub_id';
          $list_data['list'] = $frm_select_pub['list'];
          $list_data['sel'] = __earray($post_arr, 'os_pub_id', true);
          __e(build_select_box($list_data)); 
        ?>
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_title"><span class="imp">*</span>&nbsp;Title/Name</label></td>
      <td>
        <input type="text" name="os_journals_title" id="os_journals_title" value="<?php __earray($post_arr, 'os_journals_title'); ?>" maxlength="500" />              
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_disclaimer"><span class="imp">&nbsp;</span>&nbsp;Disclaimer</label></td>
      <td>
        <textarea rows="5" cols="6" name="os_journals_disclaimer" id="os_journals_disclaimer" ><?php __earray($post_arr, 'os_journals_disclaimer', FALSE, 'display'); ?></textarea>              
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_copyright"><span class="imp">&nbsp;</span>&nbsp;Copyright</label></td>
      <td>
        <textarea rows="5" cols="6" name="os_journals_copyright" id="os_journals_copyright" ><?php __earray($post_arr, 'os_journals_copyright', FALSE, 'display'); ?></textarea>              
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_content_type"><span class="imp">&nbsp;</span>&nbsp;Content Type</label></td>
      <td>
        <input type="text" name="os_journals_content_type" id="os_journals_content_type" value="<?php __earray($post_arr, 'os_journals_content_type'); ?>" maxlength="500" />              
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <h3>Other Details</h3>
      </td>
    </tr>    

    <tr>
      <td><label for="os_journals_issn"><span class="imp">*</span>&nbsp;ISSN</label></td>
      <td>
        <input type="text" name="os_journals_issn" id="os_journals_issn" value="<?php __earray($post_arr, 'os_journals_issn'); ?>" maxlength="50" />              
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_e_issn"><span class="imp">&nbsp;</span>&nbsp;E-ISSN</label></td>
      <td>
        <input type="text" name="os_journals_e_issn" id="os_journals_e_issn" value="<?php __earray($post_arr, 'os_journals_e_issn'); ?>" maxlength="50" />              
      </td>
    </tr>          
    <tr>
      <td><label for="os_journals_access"><span class="imp">&nbsp;</span>&nbsp;Access Type</label></td>
      <td class="rdcls">
        <?php $chk = __earray($post_arr, 'os_journals_access', TRUE); ?>
        <input type="radio" name="os_journals_access" id="os_journals_access_pub" value="1" <?php if($chk == 1){__e('checked="checked"');}?>/>
        <label for="os_journals_access_pub">Paid Access</label>
        <input type="radio" name="os_journals_access" id="os_journals_access_pvt" value="2" <?php if($chk == 2){__e('checked="checked"');}?>/>
        <label for="os_journals_access_pvt">Open Access</label>
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_price"><span class="imp">*</span>&nbsp;Price</label></td>
      <td>
        <input type="text" name="os_journals_price" id="os_journals_price" value="<?php __earray($post_arr, 'os_journals_price'); ?>" maxlength="15" />              
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_issue"><span class="imp">&nbsp;</span>&nbsp;Issues</label></td>
      <td>
        <input type="text" name="os_journals_issue" id="os_journals_issue" value="<?php __earray($post_arr, 'os_journals_issue'); ?>" maxlength="100" />              
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_subscription"><span class="imp">&nbsp;</span>&nbsp;Subscription</label></td>
      <td>
        <input type="text" name="os_journals_subscription" id="os_journals_subscription" value="<?php __earray($post_arr, 'os_journals_subscription'); ?>" maxlength="100" />              
      </td>
    </tr>
    <tr>
      <td><label for="os_journals_short_descp"><span class="imp">&nbsp;</span>&nbsp;Short Description</label></td>
      <td>
        <textarea rows="5" cols="6" name="os_journals_short_descp" id="os_journals_short_descp" ><?php __earray($post_arr, 'os_journals_short_descp', FALSE, 'display'); ?></textarea>              
      </td>
    </tr>

    <tr>
      <td><label for="os_journals_cover_img"><span class="imp">&nbsp;</span>&nbsp;Cover Image</label></td>
      <td>
        <input type="file" name="os_journals_cover_img" id="os_journals_cover_img" />
        <input type="hidden" name="hd_os_journals_cover_img" id="hd_os_journals_cover_img" value="<?php __earray($post_arr, 'os_journals_cover_img'); ?>"/>
        <?php if($frm_mode == 'edit'){
          $p_img = __earray($post_arr, 'os_journals_cover_img',TRUE);
          $p_id = __earray($post_arr, 'os_journals_id',TRUE);
          $p_title = __earray($post_arr, 'os_journals_title',TRUE);
          __e( _journals_img($p_img,$p_title,0,$p_id ) );                    
        }?>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr> 
    <tr>
      <td colspan="3">
        <h3>Long Description</h3>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right"><?php
					$data = array(
								  'name'        => 'os_journals_descp',
								  'id'          => 'os_journals_descp',
								  'width'       => '90%',
								  'height'      => '300',
                  'value'       => __earray($post_arr, 'os_journals_descp', TRUE, 'display'),
                  'toolbarset'  => get_fck_toolbar()
						);
					
					echo form_fckeditor( $data );
					?></td>
    </tr>
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr> 
    <tr>
      <td colspan="3">
        <h3>Editorial</h3>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right"><?php
					$data = array(
								  'name'        => 'os_journals_editorial',
								  'id'          => 'os_journals_editorial',
								  'width'       => '90%',
								  'height'      => '300',
                  'value'       => __earray($post_arr, 'os_journals_editorial', TRUE, 'display'),
                  'toolbarset'  => get_fck_toolbar()
						);
					
					echo form_fckeditor( $data );
					?></td>
    </tr> 
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr> 
    <tr>
      <td colspan="3">
        <h3>Co-Editors</h3>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right"><?php
					$data = array(
								  'name'        => 'os_journals_co_editors',
								  'id'          => 'os_journals_co_editors',
								  'width'       => '90%',
								  'height'      => '300',
                  'value'       => __earray($post_arr, 'os_journals_co_editors', TRUE, 'display'),
                  'toolbarset'  => get_fck_toolbar()
						);
					
					echo form_fckeditor( $data );
					?></td>
    </tr> 
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr> 
    <tr>
      <td colspan="3">
        <h3>Editors in Chief</h3>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right"><?php
					$data = array(
								  'name'        => 'os_journals_editors_in_chief',
								  'id'          => 'os_journals_editors_in_chief',
								  'width'       => '90%',
								  'height'      => '300',
                  'value'       => __earray($post_arr, 'os_journals_editors_in_chief', TRUE, 'display'),
                  'toolbarset'  => get_fck_toolbar()
						);
					
					echo form_fckeditor( $data );
					?></td>
    </tr> 
     <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr> 
    <tr>
      <td colspan="3">
        <h3>Abstract</h3>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right"><?php
					$data = array(
								  'name'        => 'os_journals_abstract',
								  'id'          => 'os_journals_abstract',
								  'width'       => '90%',
								  'height'      => '300',
                  'value'       => __earray($post_arr, 'os_journals_abstract', TRUE, 'display'),
                  'toolbarset'  => get_fck_toolbar()
						);
					
					echo form_fckeditor( $data );
					?></td>
    </tr> 
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3" align="right">
        <input type="submit" name="btn_reg" id="btn_reg" value="Submit" class="button-submit"/>
        <input type="reset" name="btn_reset" id="btn_reset" value="Reset" class="button-submit"/>
      </td>
    </tr>
  </table>
  </fieldset>  
</form>
</div>
